using System;
using System.Collections.Generic;
using System.ComponentModel;
using Microsoft.Xna.Framework.Content.Pipeline.Processors;
using Microsoft.Xna.Framework.Content.Pipeline;
using Scurvy.Media.VideoModel;

namespace Scurvy.Media.Pipeline.Video
{
    [ContentProcessor(DisplayName = "Video - Scurvy Media")]
    public class VidProcessor : ContentProcessor<IVideoContent, IVideoContent>
    {
        private PlaybackType _type = PlaybackType.Stream;
        private bool _usecompression;

        [DisplayName("Playback Type")]
        [DefaultValue(PlaybackType.Stream)]
        [Description("Allows you to choose the playback type")]
        public PlaybackType Type
        {
            get { return _type; }
            set { _type = value; }
        }

        [DisplayName("Use Compression")]
        [DefaultValue(false)]
        [Description("If true, uses DXT1 compression on frame data")]
        public bool UseCompression {
            get { return _usecompression; }
            set { _usecompression = value; }
        }

        public override IVideoContent Process(IVideoContent input, ContentProcessorContext context)
        {
            input.PlayType = _type;
            input.UseCompression = this.UseCompression;

            return input;
        }
    }
}
